package utilitarios;

import org.hibernate.Transaction;

public class TransacaoFactory {

	static Transaction tx;
	static SessaoFactory sessaoFactory = new SessaoFactory();
	
	private TransacaoFactory() {}
	
	public static Transaction getTransacao() {
		if(tx == null) {
			tx = SessaoFactory.getSession().beginTransaction();
		}
		
		return tx;
	}
}
